package com.py.credit.dao;

import com.py.credit.common.Page;
import com.py.credit.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public interface IntegratedQueryDao {

    List<Map<String, Object>> selectByConditionForPage(@Param(value = "status") String status,
    												@Param(value = "lingyu") String lingyu,
    													@Param(value = "jclb") String jclb,
                                                       @Param(value = "type") String type,
                                                       @Param(value = "columns") List<String> showColumns,
                                                       @Param(value = "additionalColumns") String[] additionalColumns,
                                                       @Param(value = "conditions") List<String> conditions,
                                                       @Param(value = "page") Page page);

    /**
     * 查询反馈部门的数量
     *
     * @param ajbh
     * @return
     */
    int selectFkDept(@Param(value = "ajbh") String ajbh);

    IntegratedQuery selectByAjbh(@Param(value = "ajbh") String ajbh);

    List<Measure> selectCsByAjbhForPage(@Param(value = "type") String type,
                                        @Param(value = "gzId") int gzId,
                                        @Param(value = "page") Page page);

    Companymess selectQYXXByTybm(@Param(value = "tybm") String tybm);

    Companymess selectGRXXByTybm(@Param(value = "tybm") String tybm);

    Person selectZrrInfo(@Param(value = "idcard") String idcard);

    /**
     * 获取列表详情页面
     *
     * @param ajbh
     * @param managerId
     * @param page
     * @return
     */
    List<Feedback> feedBackListForPage(@Param(value = "ajbh") String ajbh,
                                       @Param(value = "managerId") String managerId,
                                       @Param(value = "page") Page page);

    List<DeptNum> selectNumForDept(@Param(value = "ajbh") String ajbh);

    List<Integer> selectDeptId(@Param(value = "gzId") int gzId);

    int selectAllDept();

    List<Measure> selectFkCsByAjbh(@Param(value = "type") String type,
                                   @Param(value = "gzId") int gzId,
                                   @Param(value = "deptId") String deptId);

    List<Map<String, String>> selectFeedBackInfo(@Param(value = "ajbh") String ajbh);

    int selectCyDeptIsAllDept(@Param(value = "gzId") int gzId);

    String selectCyDeptName(@Param(value = "gzId") int gzId);

    int selectExistAllDeptByAjbh(@Param(value = "ajbh") String ajbh);

    int selectNumForAllDept(@Param(value = "ajbh") String ajbh);

    /**
     * 综合查询文件导出
     *
     * @param deptId
     * @param type
     * @param jclb
     * @return
     */
    List<IntegratedQuery> selectExportIntegratedQueryList(@Param(value = "deptId") String deptId,
                                                          @Param(value = "type") String type,
                                                          @Param(value = "jclb") String jclb);

    /**
     * 获取列表详情页面
     *
     * @param jclb
     * @param ztmc
     * @param startTime
     * @param endTime
     * @param page
     * @return
     */
    List<IntegratedQuery> getChartsDetailListForPage(@Param(value = "jclb") String jclb,
                                                     @Param(value = "ztmc") String ztmc,
                                                     @Param(value = "startTime") String startTime,
                                                     @Param(value = "endTime") String endTime,
                                                     @Param(value = "page") Page page);

    List<Measure> selectFeedbackCsList(@Param(value = "feedbackId") int feedbackId);

    List<LinkedHashMap> selectFkzbListForPage(@Param(value = "ajbh") String ajbh,
                                              @Param(value = "page") Page page);

    int selectFkcs(@Param(value = "ajbh") String ajbh,
                   @Param(value = "csId") String csId,
                   @Param(value = "deptIdList") List<Long> deptIdList);

    List<LinkedHashMap> selectFkzbExcelList(@Param(value = "ajbh") String ajbh);
    
    List<Map> getLhcj(
    		@Param(value = "ztmc") String ztmc,
    		@Param(value = "bm") String bm,
    		@Param(value = "type") String type);
}
